﻿using System;

namespace LibraryONTrack.Persistence.DataMappers
{
	class DataMapperFactory
	{
		public IDataMapper GetMapper(Type dtoType)
		{
			switch (dtoType.Name)
			{
				case "Book":
					return new BookMapper();
				case "Person":
					return new PersonMapper();
				case "OverdueBook":
					return new OverdueBookMapper();
				case "Teacher":
					return new TeacherMapper();
				case "Student":
					return new StudentManager();
				default:
					return new GenericMapper(dtoType);
			}
		}

	}
}
